package top.jle.wx.proxy.feign.material;

import com.alibaba.fastjson2.JSONObject;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(url = "https://api.weixin.qq.com",name="getMaterial")
public interface GetMaterialAPIFeign {

    /**
     * 获取临时素材
     * @param accessToken
     * @param mediaId
     * @return
     */
    @GetMapping("/cgi-bin/media/get")
    Response getTemporary(@RequestParam("media_id") String mediaId);


    /**
     * 获取永久素材
     * @param accessToken
     * @param mediaId
     * @return
     */
    @PostMapping("/cgi-bin/material/get_material")
    Response getMaterial(@RequestBody JSONObject mediaId);
}
